package com.aionemu.gameserver.services;

import com.aionemu.gameserver.dataholders.DataManager;
import com.aionemu.gameserver.model.flyring.FlyRing;
import com.aionemu.gameserver.model.templates.flyring.FlyRingTemplate;
import org.apache.log4j.Logger;


public class FlyRingService {
    Logger log = Logger.getLogger(FlyRingService.class);

    private static class SingletonHolder {
        protected static final FlyRingService instance = new FlyRingService();
    }

    public static final FlyRingService getInstance() {
        return SingletonHolder.instance;
    }

    private FlyRingService() {
        log.info("FlyRingService loaded sucessfully and spawned:");
        log.info("");
        for (FlyRingTemplate t : DataManager.FLY_RING_DATA.getFlyRingTemplates()) {
            FlyRing f = new FlyRing(t);
            f.spawn();
            log.debug("Added " + f.getName() + " at m=" + f.getWorldId() + ",x=" + f.getX() + ",y=" + f.getY() + ",z=" + f.getZ());
            log.info(f.getName());
        }
    }
}
